<template>
  <div v-if="$route.meta.useFrame != undefined && $route.meta.useFrame == true">
    <router-view></router-view>
  </div>
  <div v-if="$route.meta.useFrame == undefined || $route.meta.useFrame == false">
  <el-container>
    <el-header>
      <el-row class="row-bg" justify="space-between">
        <el-col :span="6">
          <img class="logo" src="./assets/logo.jpg" alt="">
        </el-col>
        <el-col :span="6"></el-col>
        <el-col :span="6">
          <el-dropdown :hide-on-click="false">
            <span class="el-dropdown-link">
              萧炎<el-icon class="el-icon--right"><arrow-down /></el-icon>
            </span>
            <template #dropdown>
              <el-dropdown-menu>
                <el-dropdown-item>账户与安全</el-dropdown-item>
                <el-dropdown-item>个人中心</el-dropdown-item>
                <el-dropdown-item>联系我们</el-dropdown-item>
                <el-dropdown-item divided command="logout">注销</el-dropdown-item>
              </el-dropdown-menu>
            </template>
          </el-dropdown>
        </el-col>
      </el-row>
    </el-header>
    <el-container>
      <el-aside width="180px">
        <Menu></Menu>
      </el-aside>
      <el-main><!--路由得出口-->
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
  </div>
</template>
<script setup lang="ts">
import Menu from './components/Menu.vue';
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}

.el-header {
  width: 100%;
  height: 45px;
  background-color: #c6e2ff;
  padding-left: 0px;
  padding-right: 0px;
}

.logo {
  width: 180px;
  height: 45px;
  padding-left: 0px;
}

.el-dropdown {
  float: right;
  padding-top: 13px;
  color: rgb(15, 16, 16);
  padding-right: 2px;
  font-weight: 700;
}
</style>
